import React from 'react';

//props.colors=[[255,255,255,1.0],...,[0,0,0,1.0]]
function WGradientColorBox(props) {

    let colors1str = "linear-gradient(90deg" ;
    for(let c of props.colors){
        colors1str +=  ',rgba(' + c[0] + ','+c[1]+','+c[2]+','+c[3]+')' ;
    }
    colors1str+=')' ;

    let gradientValue = colors1str ;

    return (
        <div style={{width:'100%',height:'100%',backgroundImage:gradientValue}}></div>
    )
}

export default WGradientColorBox;
